<<<<<<< HEAD:src/main/java/com/xxd/spring/boot/demo/wubolin/Result.java
package com.xxd.spring.boot.demo.wubolin;
=======
package com.xxd.spring.boot.demo.lihonghai;
>>>>>>> f27c6c20debe0027f4d9f8387aa1bfca4727bb11:src/main/java/com/xxd/spring/boot/demo/lihonghai/Result.java

public class Result {
    private String message;
    private String code;
    private Object data;

    public void setMessage(String message) {
        this.message = message;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }

    public Object getData() {
        return data;
    }

    public Result success(){
        this.message="成功";
        this.code="200";
        return this;
    }

    public Result error(){
        this.message="服务器异常";
        this.code="500";
        return this;
    }

    public Result setData(Object data){
        this.data = data;
        return this;
    }
}
